package com.yyyzzz.service.impl;

import com.yyyzzz.DAO.adminDao;

import com.yyyzzz.DAO.impl.adminDaoimpl;
import com.yyyzzz.bean.Admin;
import com.yyyzzz.service.adminService;

public class adminServiceimpl implements adminService {
    adminDao adminDao=new adminDaoimpl();
    @Override
    public boolean isRegister(Admin admin) {
        if (adminDao.insteradmin(admin) == 0) {
            return false;
        } else {
            return true;
        }
    }

    @Override
    public boolean isLogin(Admin admin) {
        adminDao adminDao = new adminDaoimpl();
        Admin admin1 = adminDao.selectadmin(admin);
        if(admin1 == null){
            return false;
        }
        return true;
    }
}
